package com.wumao.service;

import com.wumao.pojo.Blog;
import com.wumao.pojo.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-16 16:51
 */
public interface BlogService {

    /*对博客进行增删改查*/
    Blog getBlog(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlog(Long id,Pageable pageable);

    Blog getAndConvert(Long id);


    Page<Blog> listBlog(String query,Pageable pageable);

    List<Blog> listRecommendBlogTop(Integer size);

    Blog saveBlog(Blog blog);

    Map<String,List<Blog>> archiveBlog();

    Long countBlog();

    Blog updateBlog(Long id,Blog blog);

    void deleteBlog(Long id);
}
